#ifndef _MRANDOM_HPP_
#define _MRANDOM_HPP_
#include <climits>
#include <cstdlib>
#include <random>
// 并行会得到同样的数据
class RandDouble {
private:
  std::default_random_engine engine;
  std::uniform_real_distribution<> dist;

public:
  RandDouble(double low, double high) : dist(low, high) {}
  // double operator()() { return dist(engine); }
  double operator()() { return 1.0 * (random() % INT_MAX) * 2.0 / INT_MAX - 1; }
};

#endif